#include<iostream>
#include"Sales_item.h"
int main()
{
  Sales_item curritem,item;
  std::cout<<"请输入销售记录："<<std::endl;
  if(std::cin>>curritem){
    int cnt=1;
  while(std::cin>>item){
    if(curritem.isbn()==item.isbn())
      cnt++;
    else{
      std::cout<<curritem.isbn()<<"有"<<cnt<<"条销售记录"<<std::endl;
      curritem=item;
      cnt=1;
    }
  }
  std::cout<<curritem.isbn()<<"有"<<cnt<<"条销售记录"<<std::endl;
  }
  return 0;
}
